package org.bbl.db.mybatis.mapper;

import org.apache.ibatis.annotations.Select;
import org.bbl.db.domain.Book;

import java.util.List;

/**
 * @author biniamg
 * @since 1/2/13
 */
public interface BookMapper extends BaseMapper<Book> {

    @Select("SELECT * FROM BOOK WHERE BOOKID = #{param1} AND LANGUAGEID = #{param2}")
    public Book findByIdAndLanguage(int param1, int param2);

    @Select("SELECT * FROM BOOK ORDER BY BOOKID")
    public List<Book> findAll();

    @Select("SELECT * FROM BOOK WHERE LANGUAGEID = #{groupId}")
    public List<Book> findByParentId(int groupId);

}
